package com.net.common.exception;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author  on 2016/1/12.
 * 线程异常Exception推出的拦截器
 */
public class ThreadUncaughtExceptionLogHandler implements Thread.UncaughtExceptionHandler {
    private static final Logger LOGGER = LoggerFactory.getLogger(ThreadUncaughtExceptionLogHandler.class);

    @Override
    public void uncaughtException(Thread t, Throwable e) {
        LOGGER.error("thread uncaught exception|threadName=" + t.getName(), e);
    }
}
